<template>
  <div class="myheader">
    <nav>
      <div class="navbar-logo"><span class="iconfont icon-zuojiantou" v-if="this.$route.path === '/login'" @click="fanhui"></span></div>
      <div class="navbar-title">猫眼电影</div>
      <div class="navbar-button">
        <span class="iconfont icon-nav" v-if="this.$route.path !== '/login'"></span>
      </div>
    </nav>
  </div>
</template>

<script>
export default {
  name: "MyHeader1",
  props: {},
  methods:{
    fanhui(){
      this.$router.go(-1)
    }
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.myheader {
  width: 100%;
  background: #e54847;
  color: #fef9f9;
  text-align: center;
  line-height: 1.0133rem;
  height: 1.0133rem;

  nav {
    display: flex;

    .navbar-logo {
      width: 20%;
      height: 1.0133rem;
      display: block;
      .icon-zuojiantou{
        position: absolute;
      left: 15px;
      }
    }

    .navbar-title {
      width: 60%;
      height: 1.0133rem;
      display: block;
      font-size: 18px;
    }

    .navbar-button {
      width: 20%;
      text-align: right;
      font-size: 30px;

      .icon-nav {
        position: relative;
        font-size: 25px;
        right: 5px;
      }
    }
  }
}
</style>
